package com.lixin.model.notify;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * Description:
 * Copyright:   Copyright (c)2023
 * Company:     sci
 *
 * @author: 张李鑫
 * @version: 1.0
 * Create at:   2023-08-03 21:09:12
 * <p>
 * Modification History:
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2023-08-03     张李鑫                     1.0         1.0 Version
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class NotifyRes<T> {
    private byte type;
    private T data;

    public NotifyRes() {
    }

    public NotifyRes(byte type, T data) {
        this.type = type;
        this.data = data;
    }

    public static <T> NotifyRes<T> createNotify(byte type, T data) {
        return new NotifyRes<>(type, data);
    }

}
